package com.ruoyi.iot.service;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.iot.domain.IotModelTypeEntity;
import com.ruoyi.iot.domain.MetadataTypeEntity;
import com.ruoyi.iot.domain.PioltDeviceDyData;
import com.ruoyi.iot.mapper.MetaDbMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@DataSource(DataSourceType.METADB)
@Service
public class DataMetaDbService {
    @Autowired
    private MetaDbMapper metaDbMapper;

    public List<MetadataTypeEntity> selectMetaTypes(String type) {
        return metaDbMapper.selectMetaTypes(type);
    }

    public List<IotModelTypeEntity> selectIotTypes() {
        return metaDbMapper.selectIotTypes();
    }

    ///以下接口是临时的，为了应付--后期将通过开放接口服务实现
    public List<PioltDeviceDyData> selectPioltDeviceDataList(PioltDeviceDyData pioltDevice) {
        return metaDbMapper.selectPioltDeviceDataList(pioltDevice);
    }


}
